-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: view+module native templates #562
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atlj
force-pushed
the
@atlj/golden-template
branch
from
June 11, 2024 11:22
993d5cd
to
5e20c86
Compare
atlj
changed the title
feat: kotlin-objc view+module native template
feat: view+module native templates
Jun 13, 2024
satya164
approved these changes
Jun 14, 2024
satya164
added a commit
that referenced
this pull request
Jul 2, 2024
atlj
added a commit
that referenced
this pull request
Jul 19, 2024
This adds new templates that use `Kotlin` and `Objective-C`. The templates each have a native view and a native module included. 1. With 993d5cd, the new arch and mixed arch views will no longer have the `View` suffix in their codegen names. This doesn't break codegen as the name field is arbitrary as it isn't stated otherwise [in the new arch working group documents](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries-prerequisites.md#configure-codegen). One important matter to remember here is to make sure we pass the `RN` prefix since headers can conflict. 2. No more Java templates! I've removed them all for the sake of Kotlin. 3. I've removed templates like view-new (new arch-only view template) since we now have view+module templates and it would be hard to maintain the old model. 4. I kept `module-legacy`, `module-mixed`, and `module-new` since they are used by cpp. 5. I kept `module-legacy`, and `view-legacy` since they are used by Swift. 1. Go to `packages/create-react-native-library`. 7. Call `yarn prepare` to build the CLI. 8. Run `./bin/create-react-native-library` to run the CLI you built. 9. Fill in the name, email, etc., and make sure to select ` Fabric view and Turbo module with backward compat`. 10. Go to the library you created and make sure to build the following: a. Android with old architecture b. iOS with old architecture c. Android with new architecture d. iOS with new architecture
atlj
added a commit
that referenced
this pull request
Sep 17, 2024
This adds new templates that use `Kotlin` and `Objective-C`. The templates each have a native view and a native module included. 1. With 993d5cd, the new arch and mixed arch views will no longer have the `View` suffix in their codegen names. This doesn't break codegen as the name field is arbitrary as it isn't stated otherwise [in the new arch working group documents](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries-prerequisites.md#configure-codegen). One important matter to remember here is to make sure we pass the `RN` prefix since headers can conflict. 2. No more Java templates! I've removed them all for the sake of Kotlin. 3. I've removed templates like view-new (new arch-only view template) since we now have view+module templates and it would be hard to maintain the old model. 4. I kept `module-legacy`, `module-mixed`, and `module-new` since they are used by cpp. 5. I kept `module-legacy`, and `view-legacy` since they are used by Swift. 1. Go to `packages/create-react-native-library`. 7. Call `yarn prepare` to build the CLI. 8. Run `./bin/create-react-native-library` to run the CLI you built. 9. Fill in the name, email, etc., and make sure to select ` Fabric view and Turbo module with backward compat`. 10. Go to the library you created and make sure to build the following: a. Android with old architecture b. iOS with old architecture c. Android with new architecture d. iOS with new architecture
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This adds new templates that use
Kotlin
andObjective-C
. The templates each have a native view and a native module included.Other Changes / Side Effects
View
suffix in their codegen names. This doesn't break codegen as the name field is arbitrary as it isn't stated otherwise in the new arch working group documents. One important matter to remember here is to make sure we pass theRN
prefix since headers can conflict.module-legacy
,module-mixed
, andmodule-new
since they are used by cpp.module-legacy
, andview-legacy
since they are used by Swift.Test plan
packages/create-react-native-library
.yarn prepare
to build the CLI../bin/create-react-native-library
to run the CLI you built.Fabric view and Turbo module with backward compat
.a. Android with old architecture
b. iOS with old architecture
c. Android with new architecture
d. iOS with new architecture